home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
PRG
/
PowerFantasm 4.10 unreg.sit
/
PowerFantasm 410 unreg
/
Beginners guide
/
GUIDE EXAMPLES
/
EXAMPLE2.S
< prev
next >
Wrap
Text File
|
1996-06-21
|
721b
|
19 lines
*************************************************************************
*Example program to add three numbers and print them in a window *
*************************************************************************
EXAMPLE2: BSR INIT_CURSOR *part of io_lib.s
LEA WINDOW_TITLE,A0
BSR OPEN_WINDOW *PART OF IO_LIB.S
MOVE.L A0,WINDOW_HANDLE *OPEN_WINDOW RETURNS A HANDLE TO THE WINDOW
MOVE.L #10,D0
ADD.W #20,D0
ADD.W #30,D0
BSR PRINTNUM *part of io_lib.s - PRINTS D0
MOVE.L WINDOW_HANDLE,A0 *GET THE HANDLE FOR THE WINDOW
BSR CLOSE_WINDOW *CLOSE THE WINDOW
RTS
INCLUDE IO_LIB.S
****VARIABLES
WINDOW_TITLE: DC.B "EXAMPLE2",0
WINDOW_HANDLE: DS.L 1
************************END OF EXAMPLE2********************